package com.app.aipass.data.source.http.service;

import com.app.aipass.entity.Article;
import com.app.aipass.entity.ArticleEntity;
import com.app.aipass.entity.AssetIndexEntity;
import com.app.aipass.entity.BillEntity;
import com.app.aipass.entity.ConfigEntity;
import com.app.aipass.entity.DemoEntity;
import com.app.aipass.entity.ExchangeCoinEntity;
import com.app.aipass.entity.ExchangeHomeEntity;
import com.app.aipass.entity.ExchangeLogEntity;
import com.app.aipass.entity.ExchangeRecordEntity;
import com.app.aipass.entity.FinanceOrderAllEntity;
import com.app.aipass.entity.FinancingOrderEntity;
import com.app.aipass.entity.FindPswEntity;
import com.app.aipass.entity.FiveBuyFiveSellEntity;
import com.app.aipass.entity.FundsBalanceEntity;
import com.app.aipass.entity.GetAiIndexEntity;
import com.app.aipass.entity.GetRewardEntity;
import com.app.aipass.entity.MyPacketEntity;
import com.app.aipass.entity.OrderListEntity;
import com.app.aipass.entity.OtcConfig;
import com.app.aipass.entity.PacketListEntity;
import com.app.aipass.entity.PayAccountEntity;
import com.app.aipass.entity.PlanIndexEntity;
import com.app.aipass.entity.PointEntity;
import com.app.aipass.entity.QiniuToken;
import com.app.aipass.entity.ShopTokenEntity;
import com.app.aipass.entity.SityServiceLogEntity;
import com.app.aipass.entity.TaskInfoEntity;
import com.app.aipass.entity.TimeNumZone;
import com.app.aipass.entity.TransactionOrderEntity;
import com.app.aipass.entity.TransactionPlanEntity;
import com.app.aipass.entity.TransactionPlanListData;
import com.app.aipass.entity.UpdateCongigEntity;
import com.app.aipass.entity.UploadFileEntity;
import com.app.aipass.entity.UserEntity;
import com.app.aipass.entity.UserInfoEntity;
import com.app.aipass.entity.WalletEntity;
import com.app.aipass.entity.WalletTypeEntity;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import me.goldze.mvvmhabit.http.BaseResponse;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by goldze on 2017/6/15.
 */

public interface DemoApiService {

    /** 获取验证码
     * @return
     */
    @GET("api/reward")
    Observable<GetRewardEntity> getReward(@Header("authorization") String token);


    //*******************基础接口****************************

    /** 上传文件
     * type  string
     * file  ($binary)
     * @param token
     * @param file
     * @return
     */
    @Multipart
    @POST("api/base/files")
    Observable<BaseResponse<UploadFileEntity>> uploadFile(@Header("authorization") String token, @Query("type") String type, @Part() MultipartBody.Part file);

    /** 发送短信验证码
     * type:手机验证码类型：1:注册，2:找回密码，3:更换手机号, 4:添加银行卡, 5:设置支付密码,6: 登陆, 11: otc支付, 12: 挂单 用户, 13:挂单 订单
     * Request body   captcha_key 验证码KEY       captcha_code      phone   type
     * @return
     */
    @POST("api/base/sms")
    Observable<ResponseBody> smsCode(@Header("authorization") String token, @Body HashMap<String, Object> map);

    /** 获取验证码
     * @return
     */
    @GET("api/captcha")
    Observable<BaseResponse> captcha(@Header("token") String token);

    /** 缩略图
     * template 图片处理模板，默认有 small,medium,large三种
     * image_path 储存的文件名，程序保存时的路径
     * @return
     */
    @GET("imagecache/{template}/{image_path}")
    Observable<BaseResponse> captcha(@Header("token") String token, @Path("template") String template, @Path("image_path")String image_path);

    /** 配置信息
     * template 图片处理模板，默认有 small,medium,large三种
     * image_path 储存的文件名，程序保存时的路径
     * @return
     */
    @GET("api/new/configs")
    Observable<BaseResponse<ConfigEntity>> apiConfigs(@Header("token") String token);

    /** 获取知天下商城token
     * @return
     */
    @POST("api/apiztxshop/get_token")
    Observable<BaseResponse<ShopTokenEntity>> getZTXShopToken(@Header("authorization") String token, @Query("mobile") String mobile);

    /** 积分兑换AD或CSC
     * @return
     */
    @POST("http://store.zhilingshenghuo.com/api/apiztxcsc/exchange_csc_wallet")
    Observable<ResponseBody> pointExchangeCsc(@Header("authorization") String token, @QueryMap HashMap<String, Object> map);

    /** 获取积分
     * @return
     */
    @GET("http://store.zhilingshenghuo.com/api/package/wallet")
    Observable<BaseResponse<PointEntity>> pointWallet(@Header("authorization") String token);

    /**积分记录
     * GET /api/package/wallet/log?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpcy_type=point&type=project_exchange HTTP/1.1
     * @param token
     * @return {"data":[],"meta":{"pagination":{"total":0,"count":0,"per_page":20,"current_page":1,"total_pages":1,"links":[]}}}
     */
    @GET("http://store.zhilingshenghuo.com/api/package/wallet/log?money_type=point")
    Observable<BaseResponse<List<BillEntity>>> walletLog(@Header("authorization") String token,@Query("page") String page);
//*******************基础接口****************************

    //-----------------------------用户---------------------------------
    /**
     * 手机登录POST
     */
    @POST("api/base/authorizations/sms")
    Observable<BaseResponse<ShopTokenEntity>> login(@Body HashMap<String, Object> map);//@Body @QueryMap

    /**http://newcsc.chaishows.com/api/base/user
     * 当期登录用户信息
     * @return
     */
    @GET("api/base/user")
    Observable<BaseResponse<UserEntity>> baseUser(@Header("authorization") String token);

    @POST("https://mall.zhilingshenghuo.com/api/ztxcsc/getcsctoken")
    Observable<BaseResponse> getCSCToken(@Query("token") String token);


    /**http://newcsc.chaishows.com/api/base/user/password
     * 重置密码
     * @return
     */
    @PUT("api/base/user/payment_password")
    Observable<Response<Void>> reSetUserPassword(@Header("authorization") String token, @Body HashMap<String, Object> map);

    /**
     * 用户登出
     * @return
     */
    @DELETE("api/base/authorizations/current")
    Observable<ResponseBody> logoutCurrent(@Header("authorization") String token);


    //-----------------------------用户---------------------------------

    /**http://newcsc.chaishows.com/api/finance/fund/exchange_home
     * 兑换主页
     * @return
     */
    @GET("api/finance/fund/exchange_home")
    Observable<BaseResponse<ExchangeHomeEntity>> exchangeHome(@Header("authorization") String token);

    /**http://newcsc.chaishows.com/api/finance/fund/coin
     * 兑换主页
     * @return
     */
//    @GET("api/finance/fund/coin?currency=en")
    @GET("api/finance/fund/coin")
    Observable<BaseResponse<ExchangeCoinEntity>> exchangeCoin(@Header("authorization") String token);

    /**http://newcsc.chaishows.com/api/finance/ztx_shop/wallet/exchange?amount=10&coin_id=3&to_coin_id=5&payment_password=123456
     * AD兑换积分
     * @return
     */
    @POST("api/finance/ztx_shop/wallet/exchange")
    Observable<Response<Void>> exchange(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);
//    Observable<ResponseBody> exchange(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);
    /**
     * 任务包 产品列表
     * @return
     */
    @GET("api/finance/product")
    Observable<BaseResponse<List<FinanceOrderAllEntity>>> financeProduct(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);

    /**
     * 任务包 产品详情
     * @return
     */
    @GET("api/finance/product/{id}")
    Observable<BaseResponse> financeProductDetail(@Path("id") String id);


    //-------------------------任务包 订单-----------------------------
    /**
     * 任务包 订单列表
     * include = filter[1]  状态:1运行中,2到期
     * @return
     */
    @GET("api/finance/product_order")
    Observable<BaseResponse<List<FinanceOrderAllEntity>>> financeProductOrders(@Header("authorization") String token, @Query("filter[status]") String status, @Query("include") String include,@QueryMap HashMap<String, Object> map);

    /**
     * 任务包 创建订单
     * {"quantity": 1,"id": 9,"payment_password ": "123456"}
     * id  产品id；  quantity 数量；payment_password 支付密码
     * @return
     */
    @POST("api/finance/product_order")
    Observable<ResponseBody> createFinanceProductOrder(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);

    /**
     * 任务包 订单详情
     * @return
     */
    @GET("api/finance/product_order/{id}")
    Observable<BaseResponse> financeProductOrderDetails(@Header("authorization") String token,@Path("id") String id,@Query("include") String include);

    //-------------------------任务包 订单-----------------------------

    /**
     * 文章接口
     * @return
     */
    @GET("api/finance/zdesk_article/{id}")
    Observable<BaseResponse<Article>> zdeskArtivle(@Header("authorization") String token, @Path("id") String id);


//--------------------钱包日志记录-----------------

    /**http://newcsc.chaishows.com/api/otc/bill?type=34&include=filter[1]
     * 钱包日志记录
     * @param token  filter[coin_id]                  币种
     *               filter[scopeExchangeTypes]=1     兑换类型
     * @param type 类型 后台添加34 商城货币转换33 城市服务商加成收益32  现金奖励31  游戏收益30 城市服务商手续费收益29....
     * @return
     */
    @GET("api/otc/bill")
    Observable<BaseResponse<List<BillEntity>>> otcBill(@Header("authorization") String token, @Query("filter[scopeExchangeTypes]") String type, @Query("filter[coin_id]") String include, @Query("page") String page);

    /**http://newcsc.chaishows.com/api/otc/bill/1
     * 钱包日志详情
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/bill/{id}")
    Observable<BaseResponse> otcBillDetail(@Header("authorization") String token,@Path("id") String id);

    /**http://newcsc.chaishows.com/api/otc/bill/types
     * 钱包类型列表
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/bill/types")
    Observable<BaseResponse<List<WalletTypeEntity>>> otcBillTypes(@Header("authorization") String token);

    /**http://newcsc.chaishows.com/api/otc/exchange_log?filter[coin_id]=3
     * 兑换记录
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/exchange_log")
    Observable<BaseResponse<List<ExchangeLogEntity>>> exChangeLog(@Header("authorization") String token,@Query("page") String page);

//--------------------钱包日志记录-----------------

//--------------------钱包-----------------
    /**http://newcsc.chaishows.com/api/otc/wallet/coins
     * 钱包类型 列表
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/wallet/coins")
    Observable<Map<String,String>> walletCoins(@Header("authorization") String token);

    /**http://newcsc.chaishows.com/api/otc/wallet ?include=filter[1]
     * 钱包余额
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/wallet?extra_include=bill_types")
    Observable<BaseResponse<List<WalletEntity>>> otcWallet(@Header("authorization") String token,@Query("include") String include);

//--------------------钱包-----------------


//--------------------otc buy-----------------
    /**http://newcsc.chaishows.com/api/otc/buy/lists?filter[status]=0
     * 我的订单记录
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/buy/lists")
    Observable<BaseResponse<List<TransactionPlanEntity>>> otcBuyLists(@Header("authorization") String token,@Query("filter[status]") String status,@Query("page") String page);


    /**http://newcsc.chaishows.com/api/ohttp://newcsc.chaishows.com/api/otc/buy/show/229555
     * 我的订单详情
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/buy/show/{id}?include=seller,sellerPays,buyer")
    Observable<BaseResponse<TransactionOrderEntity>> otcBuyShowOrder(@Header("authorization") String token, @Path("id") String id);



    /**http://newcsc.chaishows.com/api/otc/buy?id=001&type=1&num=1&payment_password="123456"
     * 挂单订单 创建
     * id  planUser id , 状态为 0
     * type 类型:1=购买,2=出售
     * num 挂单数量
     * payment_password 支付密码
     * idcard  卡后6位,如果type=2必填
     * code 短信码,如果type=2必填
     * @param token
     * @param
     * @return
     */
    @POST("api/otc/buy")
    Observable<ResponseBody> otcBuy(@Header("authorization") String token,@Query("id") String id,@Query("type") String type
            ,@Query("num") String num,@Query("payment_password") String payment_password,@Query("idcard") String idcard,@Query("code") String code);

    /**http://newcsc.chaishows.com/api/otc/buy/confirm?id=001&payment_password="123456"
     * 卖家 确认订单
     * @param token
     * @param
     * @return
     */
    @POST("api/otc/buy/confirm")
    Observable<ResponseBody> otcBuyConfirm(@Header("authorization") String token,@Query("id") String id,@Query("payment_password") String payment_password);
    /**http://newcsc.chaishows.com/api/otc/buy/submit?id=001&payment_password="123456"&pay_id=1&image
     * 买家 确认上传
     * @param token
     * @param
     * @return
     */
    @POST("api/otc/buy/submit")
    Observable<ResponseBody> otcBuySubmit(@Header("authorization") String token,@Query("id") String id,@Query("pay_id") String pay_id,@Query("image") String image,@Query("payment_password") String payment_password);
    /**http://newcsc.chaishows.com/api/otc/buy/appeal?id=001&content ="1111"&image
     * 仲裁
     * @param token
     * @param
     * @return
     */
    @POST("api/otc/buy/appeal")
    Observable<ResponseBody> otcBuyAppeal(@Header("authorization") String token,@Query("id") String id,@Query("image") String image,@Query("content") String content);

//--------------------otc buy----------------

//--------------------otc 接口----------------
    /**http://newcsc.chaishows.com/api/otc/config
     * otc 配置信息
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/config")
    Observable<BaseResponse<OtcConfig>> otcConfig(@Header("authorization") String token);
    /**http://newcsc.chaishows.com/api/sityservice/log
     * 服务商活跃指数记录
     * @param token
     * @param
     * @return
     */
    @GET("api/sityservice/log")
    Observable<BaseResponse<SityServiceLogEntity>> sityServiceLog(@Header("authorization") String token);

//--------------------otc 接口----------------

//--------------------otc 支付记录接口接口----------------
    /**http://newcsc.chaishows.com/api/otc/payaccount
     * 支付记录
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/payaccount")
    Observable<BaseResponse<List<PayAccountEntity>>> otcPayCccount(@Header("authorization") String token);
    /**http://newcsc.chaishows.com/api/otc/payaccount
     * 添加支付记录
     * @param token
     * @param {"type": 1,"account": "Entity","name": "Unpro","address": "dsfdsfds","branch": "branch","code": 1234}
     * @return
     */
    @POST("api/otc/payaccount")
    Observable<ResponseBody> addOtcPayCccount(@Header("authorization") String token,@Body HashMap<String, Object> map);
    /**http://newcsc.chaishows.com/api/otc/payaccount?id=1
     * 删除支付记录
     * @param token
     * @param
     * @return
     */
    @DELETE("api/otc/payaccount")
//    @Headers("HEAD: HTTP-USE-CODE-RESPONSE=1")
    Observable<ResponseBody> deleteOtcPayCccount(@Header("authorization") String token,@Query("id") String id);
    /**http://newcsc.chaishows.com/api/otc/payaccount/1
     * 支付记录详情
     * @param token
     * @param
     * @return
     */
    @GET("api/otc/payaccount/{id}")
    Observable<BaseResponse> otcPayCccountDetail(@Header("authorization") String token,@Path("id") String id);
//--------------------otc 支付记录接口接口----------------


//--------------------otc 挂单接口----------------
    /**http://newcsc.chaishows.com/api/otc/plan?filter[status]=0
     * 我的挂单-用户列表  filter筛选: status 订单状态:0=进行中,1=完成 2取消 3 待审核
     * @param token  include   orders
     * @param
     * @return
     */
    @GET("api/otc/plan?is_no_pay=1")
    Observable<BaseResponse<List<TransactionPlanEntity>>> otcPlanLists(@Header("authorization") String token, @Query("filter[status]") String status, @Query("include") String orders, @Query("page") String page);

    /**http://newcsc.chaishows.com/api/otc/plan/orders?is_confirm=1
     * 挂单列表  五买 五卖
     * @param token
     *       is_confirm=1 五买  is_confirm=0 五卖
     * @return
     */
    @GET("api/otc/plan/orders")
    Observable<BaseResponse<List<FiveBuyFiveSellEntity>>> otcPlanOrders(@Header("authorization") String token, @Query("is_confirm") String is_confirm);



    /**http://newcsc.chaishows.com/api/otc/plan/lists?num_zone=100-500&filter[type]=1&filter[status]=0
     * 挂单 大厅  filter 筛选: status 订单状态:0=进行中,1=完成 2取消 3 待审核, type: 1=购买,2=出售
     * @param token  filter[type]=1    我要买    filter[type]=2    我要卖
     * @param
     * @return @Query("filter[type]") String type
     */
    @GET("api/otc/plan/lists")
    Observable<BaseResponse<List<TransactionPlanEntity>>> planLists(@Header("authorization") String token, @Query("type") String type, @Query("sort") String status, @Query("num_zone") String num_zone, @Query("page") String page);


    //*******************************************
    /**
     * 挂单-创建planuser
     *  type  类型:1=购买,2=出售
     *  num   挂单数量
     *  pay_types   1 2 3
     *  payment_password  支付密码
     *  price    价格
     *  idcard   身份证尾号6位,如果type=2必填
     *  code    短信码, 如果type=2必填
     * @return
     */
    @POST("api/otc/plan")
    Observable<ResponseBody> otcPlanCreate(@Header("authorization") String token, @QueryMap HashMap<String, Object> map);

    /**
     * 取消挂单
     * @return
     */
    @DELETE("api/otc/plan")
    Observable<ResponseBody> otcPlanCancel(@Header("authorization") String token, @Query("id") String id);

    /**
     * 挂单数据
     * @return
     */
    @GET("api/otc/plan/data")
    Observable<PlanIndexEntity> otcPlanData(@Header("authorization") String token);

    /**
     * 挂单详情
     * @return
     */
    @GET("api/otc/plan/orders/{id}?include=seller,sellerPays,buyer")
    Observable<BaseResponse<TransactionOrderEntity>> otcPlanOrderDetail(@Header("authorization") String token, @Path("id") String id);

    /**
     * 挂单用户详情
     * @return
     */
    @GET("api/otc/plan/{id}")
    Observable<BaseResponse<TransactionPlanEntity>> otcPlanOrderUserDetail(@Header("authorization") String token, @Path("id") String id, @Query("include") String include);


    /**
     * 首页进度条
     * @return
     */
    @GET("api/ai/index")
    Observable<GetAiIndexEntity> getAiIndex(@Header("authorization") String token);

    //*******************************************

//--------------------otc 挂单接口----------------






















































    @GET("action/apiv2/banner?catalog=1")
    Observable<BaseResponse<DemoEntity>> demoGet();

    @FormUrlEncoded
    @POST("action/apiv2/banner")
    Observable<BaseResponse<DemoEntity>> demoPost(@Field("catalog") String catalog);


    /**
     * 市场 POST /api/otc/plan/index?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"header":{"today_amount":"188462.00","today_count":1524,"today_trans_amount":"102931.00","today_trans_count":791},"list":[{"price":"15.60000","num":"56.0000","status_text":"","type_text":""},{"price":"15.50000","num":"1.0000","status_text":"","type_text":""},{"price":"15.73000","num":"220.0000","status_text":"","type_text":""},{"price":"15.65000","num":"30.0000","status_text":"","type_text":""},{"price":"14.91000","num":"2.0000","status_text":"","type_text":""},{"price":"15.22000","num":"6.0000","status_text":"","type_text":""},{"price":"15.40000","num":"4.0000","status_text":"","type_text":""},{"price":"16.50000","num":"10.0000","status_text":"","type_text":""},{"price":"14.90000","num":"1.0000","status_text":"","type_text":""},{"price":"15.15000","num":"6.0000","status_text":"","type_text":""},{"price":"15.75000","num":"2.0000","status_text":"","type_text":""},{"price":"15.60000","num":"50.0000","status_text":"","type_text":""},{"price":"15.30000","num":"10.0000","status_text":"","type_text":""},{"price":"15.75000","num":"197.0000","status_text":"","type_text":""},{"price":"15.19000","num":"15.0000","status_text":"","type_text":""},{"price":"15.51000","num":"22.0000","status_text":"","type_text":""},{"price":"15.79000","num":"500.0000","status_text":"","type_text":""},{"price":"15.78000","num":"200.0000","status_text":"","type_text":""},{"price":"15.40000","num":"300.0000","status_text":"","type_text":""},{"price":"15.50000","num":"200.0000","status_text":"","type_text":""},{"price":"15.80000","num":"500.0000","status_text":"","type_text":""},{"price":"15.50000","num":"300.0000","status_text":"","type_text":""},{"price":"15.62000","num":"16.0000","status_text":"","type_text":""},{"price":"15.49000","num":"4.0000","status_text":"","type_text":""},{"price":"14.90000","num":"1.0000","status_text":"","type_text":""},{"price":"15.50000","num":"5.0000","status_text":"","type_text":""},{"price":"15.80000","num":"1.0000","status_text":"","type_text":""},{"price":"15.30000","num":"4.0000","status_text":"","type_text":""},{"price":"15.79000","num":"200.0000","status_text":"","type_text":""},{"price":"15.80000","num":"178.0000","status_text":"","type_text":""}],"trans_list":[{"num":"500.000000","price":"15.7900"},{"num":"10.000000","price":"15.6300"},{"num":"5.000000","price":"15.5000"},{"num":"2.000000","price":"15.6000"},{"num":"4.000000","price":"15.4900"},{"num":"6.000000","price":"15.1500"},{"num":"6.000000","price":"15.2100"},{"num":"4.000000","price":"15.1100"},{"num":"500.000000","price":"15.7800"},{"num":"4.000000","price":"15.3000"},{"num":"2.000000","price":"15.6000"},{"num":"100.000000","price":"15.8000"},{"num":"10.000000","price":"15.3000"},{"num":"1.000000","price":"14.9000"},{"num":"2.000000","price":"15.6000"},{"num":"5.000000","price":"15.1500"},{"num":"70.000000","price":"15.4100"},{"num":"125.000000","price":"15.7900"},{"num":"69.000000","price":"15.6000"},{"num":"20.000000","price":"15.4000"},{"num":"157.000000","price":"15.8000"},{"num":"5.000000","price":"15.5800"},{"num":"65.000000","price":"15.6400"},{"num":"110.000000","price":"15.7700"},{"num":"6.000000","price":"15.0800"},{"num":"300.000000","price":"17.0200"},{"num":"170.000000","price":"15.7700"},{"num":"12.000000","price":"15.4000"},{"num":"10.000000","price":"15.2300"},{"num":"178.000000","price":"15.8000"}],"buy_set":{"price":15.655,"min_list_num":1,"max_list_num":500,"min_price_ratio":-10,"max_price_ratio":10},"sell_set":{"price":15.564,"min_list_num":1,"max_list_num":500,"min_price_ratio":-10,"max_price_ratio":10},"money":0,"coin_name":"CSC","free":"1"},"code":200,"status":"ok","msg":"success","timestamp":1623828910}  */
    @POST("api/otc/plan/index")
    Observable<BaseResponse<PlanIndexEntity>> planIndex(@Header("token") String token, @QueryMap HashMap<String, Object> map);


    //交易
    /**
     * 分区 POST /api/otc/config?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"open_time":"09:00","close_time":"21:00","status":0,"release_time":0,"pay_time":2,"submit_time":3,"min_split_amount":10,"free_ratio":1,"num_zone":[{"1-10":"1-10"},{"11-99":"11-99"},{"100-500":"100-500"}]},"code":200,"status":"ok","msg":"success","timestamp":1623550530}
     */
    @POST("api/otc/config")
    Observable<BaseResponse<TimeNumZone>> otcConfig(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**
     * 我要买 http://csc.chaishows.com/api/otc/plan/list?type=2&lang=zh-cn&page=1&keyword&num_zone=1-10
     * @param token
     * @param map
     * @return {"data":{"is_order":true,"list":{"per_page":15,"current_page":1,"has_more":true,"next_item":[{"id":2136765,"sur_num":"60.0000","num":"60.0000","coin_id":4,"price":"15.5000","type":1,"pay_types":"1,2,3","free_ratio":"1.00","nickname":"189****2420"}],"data":[{"id":2136766,"sur_num":"500.0000","num":"500.00","coin_id":4,"price":"15.6800","type":2,"pay_types":["2","1","3"],"free_ratio":"1.00","nickname":"150****1905","coin_name":"CSC"},{"id":2136627,"sur_num":"100.0000","num":"100.00","coin_id":4,"price":"15.6600","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"173****1102","coin_name":"CSC"},{"id":2136588,"sur_num":"100.0000","num":"100.00","coin_id":4,"price":"15.6000","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"178****3235","coin_name":"CSC"},{"id":2136829,"sur_num":"50.0000","num":"50.00","coin_id":4,"price":"15.6000","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"139****8626","coin_name":"CSC"},{"id":2136698,"sur_num":"10.0000","num":"10.00","coin_id":4,"price":"15.5800","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"152****2963","coin_name":"CSC"},{"id":2136712,"sur_num":"500.0000","num":"500.00","coin_id":4,"price":"15.5600","type":2,"pay_types":["2","1"],"free_ratio":"1.00","nickname":"189****7310","coin_name":"CSC"},{"id":2136828,"sur_num":"90.0000","num":"90.00","coin_id":4,"price":"15.5600","type":2,"pay_types":["2"],"free_ratio":"1.00","nickname":"188****1589","coin_name":"CSC"},{"id":2136593,"sur_num":"200.0000","num":"200.00","coin_id":4,"price":"15.5500","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"178****3235","coin_name":"CSC"},{"id":2136628,"sur_num":"10.0000","num":"10.00","coin_id":4,"price":"15.5500","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"151****4888","coin_name":"CSC"},{"id":2136638,"sur_num":"10.0000","num":"10.00","coin_id":4,"price":"15.5500","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"155****6789","coin_name":"CSC"},{"id":2136647,"sur_num":"30.0000","num":"30.00","coin_id":4,"price":"15.5500","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"155****6789","coin_name":"CSC"},{"id":2136649,"sur_num":"30.0000","num":"30.00","coin_id":4,"price":"15.5500","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"151****4888","coin_name":"CSC"},{"id":2136492,"sur_num":"100.0000","num":"100.00","coin_id":4,"price":"15.5000","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"139****8626","coin_name":"CSC"},{"id":2136630,"sur_num":"500.0000","num":"500.00","coin_id":4,"price":"15.5000","type":2,"pay_types":["2","3"],"free_ratio":"1.00","nickname":"150****5860","coin_name":"CSC"},{"id":2136687,"sur_num":"20.0000","num":"20.00","coin_id":4,"price":"15.5000","type":2,"pay_types":["1","2","3"],"free_ratio":"1.00","nickname":"189****2420","coin_name":"CSC"}]}},"code":200,"status":"ok","msg":"success","timestamp":1623549988}
     */
    @POST("api/otc/plan/list")
    Observable<BaseResponse<TransactionPlanListData>> planList(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**
     *POST http://csc.chaishows.com/api/otc/plan/wallet?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"money":0,"coin_name":"CSC"},"code":200,"status":"ok","msg":"success","timestamp":1623549989}
     */
    @POST("api/otc/plan/wallet")
    Observable<BaseResponse<WalletEntity>> planWallet(@Header("token") String token, @QueryMap HashMap<String, Object> map);


    //订单
    //全部 POST /api/otc/order/list?lang=zh-cn HTTP/1.1
//    {"data":{"list":{"per_page":20,"current_page":1,"has_more":false,"next_item":null,"data":[]}},"code":200,"status":"ok","msg":"success","timestamp":1623550925}
    //待付款POST /api/otc/order/list?status=0&lang=zh-cn HTTP/1.1
//    {"data":{"list":{"per_page":20,"current_page":1,"has_more":false,"next_item":null,"data":[]}},"code":200,"status":"ok","msg":"success","timestamp":1623550969}
//待放行POST /api/otc/order/list?status=1&lang=zh-cn HTTP/1.1
//已完成POST /api/otc/order/list?status=2&lang=zh-cn HTTP/1.1
//已取消POST /api/otc/order/list?status=3&lang=zh-cn HTTP/1.1
//异常POST /api/otc/order/list?status=4&lang=zh-cn HTTP/1.1
//待审核POST /api/otc/order/list?status=5&lang=zh-cn HTTP/1.1
    @POST("api/otc/order/list")
    Observable<BaseResponse<OrderListEntity>> orderList(@Header("token") String token, @QueryMap HashMap<String, Object> map);


    //挂单
    //全部POST /api/otc/plan/mylist?lang=zh-cn HTTP/1.1
    //进行中POST /api/otc/plan/mylist?status=0&lang=zh-cn HTTP/1.1
//    {"data":{"list":{"per_page":15,"current_page":1,"has_more":false,"next_item":null,"data":[]}},"code":200,"status":"ok","msg":"success","timestamp":1623551237}
    //已完成POST /api/otc/plan/mylist?status=1&lang=zh-cn HTTP/1.1
    //已取消POST /api/otc/plan/mylist?status=2&lang=zh-cn HTTP/1.1
    //待审核POST /api/otc/plan/mylist?status=3&lang=zh-cn HTTP/1.1
    @POST("api/otc/plan/mylist")
    Observable<BaseResponse<OrderListEntity>> orderGuaDanList(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    //资产
//    POST /api/funds/balance?lang=zh-cn HTTP/1.1
//    {"data":{"money":0},"code":200,"status":"ok","msg":"请求成功","timestamp":1623551342}
//    POST /api/asset/index?lang=zh-cn HTTP/1.1
//    {"data":{"header":[],"list":[]},"code":200,"status":"ok","msg":"成功","timestamp":1623551342}
    @POST("api/funds/balance")
    Observable<BaseResponse<FundsBalanceEntity>> fundsBalance(@Header("token") String token, @QueryMap HashMap<String, Object> map);
    @POST("api/asset/index")
    Observable<BaseResponse<AssetIndexEntity>> assetIndex(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    //我的
    /**
     * POST /api/ucenter/info?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"id":1919349,"authentication":1,"safe_level":4,"mobile_hide":"186****5186","email_hide":"","idcard_hide":"411**********73","show_name":"186****5186","payment_password":true,"mobile_open":true,"email_open":false,"ga_bind":false,"ga_open":false,"high_auth":false,"is_sub":false,"last_login_time":"2021-06-12 22:38:44","level":0,"level_name":"蚂蚁宝宝","avatar":"https:\/\/cdn1.tuochennet.cn\/7054964b6cb3811b3b234a70a98e4ac5.png","avatar_frame":"","nickname":"","signature":"","refer_code":"gEh83jf","lat":"22.543523","lng":"113.959453","cityservice_status":0,"public_free":10,"audit_quantity":0},"code":200,"status":"ok","msg":"请求成功","timestamp":1623551406}
     */
    @POST("api/ucenter/info")
    Observable<BaseResponse<UserInfoEntity>> userInfo(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    //任务包
    /**
     * POST /api/other/assets?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"todayRecharge":"0.00","waitingReview":"0.00","list":[]},"code":200,"status":"ok","msg":"成功","timestamp":1623551513}
     */
    @POST("api/other/assets")
    Observable<BaseResponse<TaskInfoEntity>> otherAssets(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**进行中 已到期
     * POST /api/financingorder/list?lang=zh-cn HTTP/1.1   进行中page=1&status=1   已到期page=1&status=2
     * @param token
     * @param map
     * @return {"data":{"coin_name":"AD","list":{"per_page":20,"current_page":1,"has_more":false,"next_item":null,"data":[{"id":7030036,"coin_id":3,"status":1,"quantity":1,"price":"10.00","lease_days":180,"profit_ratio":"11.80","expiration_time":"11-23 23:59:59","active_value":1,"createtime":"05-28 14:13:19","status_text":"进行中","coin_name":"AD","title":"米仓任务","pic":"https:\/\/cdn1.tuochennet.cn\/7c3420485bd438d8292e9222d31c3cfb.png","days_ratio":"0.62","all_release_amount":"11.18"}]}},"code":200,"status":"ok","msg":"成功","timestamp":1623551513}
     */
    @POST("api/financingorder/list")
    Observable<BaseResponse<FinancingOrderEntity>> financingorderList(@Header("token") String token, @QueryMap HashMap<String, Object> map);
//    POST /api/financingorder/list?lang=zh-cn HTTP/1.1
//    {"data":{"coin_name":"AD","list":{"per_page":20,"current_page":1,"has_more":false,"next_item":null,"data":[{"id":7030036,"coin_id":3,"status":1,"quantity":1,"price":"10.00","lease_days":180,"profit_ratio":"11.80","expiration_time":"11-23 23:59:59","active_value":1,"createtime":"05-28 14:13:19","status_text":"进行中","coin_name":"AD","title":"米仓任务","pic":"https:\/\/cdn1.tuochennet.cn\/7c3420485bd438d8292e9222d31c3cfb.png","days_ratio":"0.62","all_release_amount":"11.18"}]}},"code":200,"status":"ok","msg":"成功","timestamp":1623551513}

    //任务商城
    /**
     * POST /api/financing/list?lang=zh-cn HTTP/1.1          page=1
     * @param token
     * @param map
     * @return {"data":{"list":{"per_page":20,"current_page":1,"has_more":false,"next_item":null,"data":[{"id":2,"title":"一级米仓","coin_id":3,"price":"10.00","lease_days":48,"profit_ratio":25.5,"max_num":8,"active_value":1,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"12.55","days_release_amount":"0.26","coin_name":"AD","progress":"0\/8"},{"id":3,"title":"二级米仓","coin_id":3,"price":"100.00","lease_days":48,"profit_ratio":26.5,"max_num":4,"active_value":10,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"126.50","days_release_amount":"2.63","coin_name":"AD","progress":"0\/4"},{"id":4,"title":"三级米仓","coin_id":3,"price":"500.00","lease_days":48,"profit_ratio":27.5,"max_num":2,"active_value":50,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"637.50","days_release_amount":"13.28","coin_name":"AD","progress":"0\/2"},{"id":5,"title":"四级米仓","coin_id":3,"price":"1000.00","lease_days":48,"profit_ratio":28.5,"max_num":1,"active_value":100,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"1285.00","days_release_amount":"26.77","coin_name":"AD","progress":"0\/1"},{"id":6,"title":"五级米仓","coin_id":3,"price":"5000.00","lease_days":48,"profit_ratio":29.5,"max_num":1,"active_value":500,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"6475.00","days_release_amount":"134.89","coin_name":"AD","progress":"0\/1"},{"id":7,"title":"六级米仓","coin_id":3,"price":"10000.00","lease_days":48,"profit_ratio":30.5,"max_num":1,"active_value":1000,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"13050.00","days_release_amount":"271.87","coin_name":"AD","progress":"0\/1"},{"id":9,"title":"七级米仓","coin_id":3,"price":"100000.00","lease_days":48,"profit_ratio":32.5,"max_num":1,"active_value":10000,"createtime":"2020-08-29","pic":"https:\/\/cdn1.tuochennet.cn\/8657c9220f288f1cd43f812f57f63cfd.png","status_text":"","all_release_amount":"132500.00","days_release_amount":"2760.41","coin_name":"AD","progress":"0\/1"}]}},"code":200,"status":"ok","msg":"成功","timestamp":1623551613}
     */
    @POST("api/financing/list")
    Observable<BaseResponse<FinancingOrderEntity>> financingList(@Header("token") String token, @QueryMap HashMap<String, Object> map);

//    /**兑换积分
//     * GET /api/exchange/home?token=0103254a-877d-4169-b2c5-d4b34e5e7aab&lang=zh-cn HTTP/1.1
//     * @param token
//     * @return {"data":{"coin":[{"id":1,"image":"https:\/\/mall.zhitianxai.com\/\/uploads\/20190820\/a7a5b1bc8cbafde55933cb8500b74943.png","coin":"RMB","coin_name":"用户账户","exchange_fee":"0.00","exchange":{"1":1,"2":"0.0000","3":"0.0000","4":"0.0000","5":"0.0000"},"money":"0.0000"},{"id":2,"image":"https:\/\/mall.zhitianxai.com\/\/uploads\/20191101\/02ebd050f6018006d5f677713e7a8938.png","coin":"RMB","coin_name":"发布账户","exchange_fee":"0.10","exchange":{"1":"0.0000","2":1,"3":"0.0000","4":"0.0000","5":"0.0000"},"money":"0.0000"},{"id":3,"image":"https:\/\/cdn1.tuochennet.cn\/21a301659a49c191f4e5abaf21ed09ff.png","coin":"AD","coin_name":"AD","exchange_fee":"0.50","exchange":{"1":"0.0000","2":"0.0000","3":1,"4":"1.0000","5":"100.0000"},"money":"0.0000"},{"id":4,"image":"https:\/\/cdn1.tuochennet.cn\/36d4dcdd897f7388e80c50e7317c5b8f.png","coin":"CSC","coin_name":"CSC","exchange_fee":"0.00","exchange":{"1":"0.0000","2":"0.0000","3":"1.0000","4":1,"5":"100.0000"},"money":"0.0000"},{"id":5,"image":"","coin":"积分","coin_name":"积分","exchange_fee":"0.10","exchange":{"1":"0.0000","2":"0.0000","3":"0.0100","4":"0.0100","5":1},"money":"0.0000"}],"exchange_coin":[{"id":1,"coin_id":1,"image":"https:\/\/mall.zhitianxai.com\/\/uploads\/20190820\/a7a5b1bc8cbafde55933cb8500b74943.png","coin":"RMB","coin_name":"用户账户","exchange_fee":"0.0000"},{"id":2,"coin_id":2,"image":"https:\/\/mall.zhitianxai.com\/\/uploads\/20191101\/02ebd050f6018006d5f677713e7a8938.png","coin":"RMB","coin_name":"发布账户","exchange_fee":"0.1000"},{"id":3,"coin_id":3,"image":"https:\/\/cdn1.tuochennet.cn\/21a301659a49c191f4e5abaf21ed09ff.png","coin":"AD","coin_name":"AD","exchange_fee":"0.1000"},{"id":4,"coin_id":4,"image":"https:\/\/cdn1.tuochennet.cn\/36d4dcdd897f7388e80c50e7317c5b8f.png","coin":"CSC","coin_name":"CSC","exchange_fee":"0.0000"},{"id":5,"coin_id":5,"image":"","coin":"积分","coin_name":"积分","exchange_fee":"0.1000"}]},"code":200,"status":"ok","msg":"success","timestamp":1623830870}     */
//    @GET("api/exchange/home?lang=zh-cn")
//    Observable<BaseResponse<ExchangeHomeEntity>> exchangeHome(@Query("token") String token);

    /**getShopToken
     * POST /api/ucenter/getshoptoken?token=0103254a-877d-4169-b2c5-d4b34e5e7aab&lang=zh-cn HTTP/1.1
     * @param token
     * @return {"data":{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3N0b3JlLnpoaXRpYW54YWkuY29tL2FwaS9hcGl6dHgvc2lsZW50X2xvZ2luIiwiaWF0IjoxNjIzNTUxODg2LCJleHAiOjE2MjcxNTE4ODYsIm5iZiI6MTYyMzU1MTg4NiwianRpIjoiYnBHMWRkRWRIRnRZU2RIUiIsInN1YiI6ODAzMzYxLCJwcnYiOiI0MWJkODRlNjhhNjUxM2M1YzhlZGYzZDVmNjA1YzMxYzUzZDAwMWE1In0.KbKB-ulx3eD4Fvx-9WMdY7AZ9sKrF0WVoh_sNsDV0yU","token_type":"Bearer","expires_in":3600000},"code":200,"status":"ok","msg":"设置成功","timestamp":1623551886}
     */
    @POST("http://mall.zhilingshenghuo.com/api/ucenter/getshoptoken?lang=zh-cn")
    Observable<BaseResponse<ShopTokenEntity>> getShopToken(@Header("token") String token);


    //兑换记录
//    POST /api/ucenter/getshoptoken?token=0103254a-877d-4169-b2c5-d4b34e5e7aab&lang=zh-cn HTTP/1.1
//    {"data":{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3N0b3JlLnpoaXRpYW54YWkuY29tL2FwaS9hcGl6dHgvc2lsZW50X2xvZ2luIiwiaWF0IjoxNjIzNTUyMTQyLCJleHAiOjE2MjcxNTIxNDIsIm5iZiI6MTYyMzU1MjE0MiwianRpIjoieHBnYVdsdHNvZEEyMmsyVSIsInN1YiI6ODAzMzYxLCJwcnYiOiI0MWJkODRlNjhhNjUxM2M1YzhlZGYzZDVmNjA1YzMxYzUzZDAwMWE1In0.6kTo2QPj4FB3LvTJI1B41QgC0HAsAslaR48fH0bTVwk","token_type":"Bearer","expires_in":3600000},"code":200,"status":"ok","msg":"设置成功","timestamp":1623552143}

    /**
     * AD记录   GET /api/bill/exchangeRecord?lang=zh-cn&page=1&type=1 HTTP/1.1
     * @param token
     * @return {"data":{"per_page":20,"current_page":1,"has_more":false,"next_item":null,"data":[]},"code":200,"status":"ok","msg":"请求成功","timestamp":1623552142}
     */
    @GET("api/bill/exchangeRecord?type=1")
    Observable<BaseResponse<ExchangeRecordEntity>> exchangeRecord(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**活跃指数
     * POST /api/sityservice/log?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"header":{"basics_activity":1,"addition_activity":0},"list":[]},"code":200,"status":"ok","msg":"success","timestamp":1623552334}
     */
    @POST("api/sityservice/log")
    Observable<BaseResponse<SityServiceLogEntity>> sityServiceLog(@Header("token") String token, @QueryMap HashMap<String, Object> map);



    //安全中心
    //置换密码POST /api/ucenter/info?lang=zh-cn HTTP/1.1
//{"data":{"id":1919349,"authentication":1,"safe_level":4,"mobile_hide":"186****5186","email_hide":"","idcard_hide":"411**********73","show_name":"186****5186","payment_password":true,"mobile_open":true,"email_open":false,"ga_bind":false,"ga_open":false,"high_auth":false,"is_sub":false,"last_login_time":"2021-06-12 22:38:44","level":0,"level_name":"蚂蚁宝宝","avatar":"https:\/\/cdn1.tuochennet.cn\/7054964b6cb3811b3b234a70a98e4ac5.png","avatar_frame":"","nickname":"","signature":"","refer_code":"gEh83jf","lat":"22.543523","lng":"113.959453","cityservice_status":0,"public_free":10,"audit_quantity":0},"code":200,"status":"ok","msg":"请求成功","timestamp":1623552390}
// 验证码   POST /api/sms/setpassword?lang=zh-cn HTTP/1.1
//    {"data":null,"code":200,"status":"ok","msg":"发送成功","timestamp":1623552488}
//  修改密码  POST /api/ucenter/setpassword?lang=zh-cn HTTP/1.1
//    {"data":null,"code":200,"status":"ok","msg":"修改成功","timestamp":1623552538}

    /**
     * 验证码   POST /api/sms/setpassword?lang=zh-cn HTTP/1.1 account_type=mobile&type=payment
     * @param token
     * @param map
     * @return {"data":null,"code":200,"status":"ok","msg":"发送成功","timestamp":1623552488}
     */
    @POST("api/sms/setpassword")
    Observable<BaseResponse> smsSetpassword(@Header("token") String token, @QueryMap HashMap<String, Object> map);


    /**
     * 修改密码  POST /api/ucenter/setpassword?lang=zh-cn HTTP/1.1
     * @param token  password=123456&confirm_password=123456&type=payment&mobile_code=953102&email_code=&ga_code=
     * @param map
     * @return {"data":null,"code":200,"status":"ok","msg":"修改成功","timestamp":1623552538}
     */
    @POST("api/ucenter/setpassword")
    Observable<BaseResponse> setPassword(@Header("token") String token, @QueryMap HashMap<String, Object> map);


    /**收款方式
     * POST /api/otc/payaccount/list?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":[],"code":200,"status":"ok","msg":"请求成功","timestamp":1623552611}
     */
    @POST("api/otc/payaccount/list")
    Observable<BaseResponse> payAccountList(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**收款方式 验证码
     * POST http://csc.chaishows.com/api/sms/general?lang=zh-cn HTTP/1.1
     * @param token  verify_type=collection&type=mobile
     * @param map
     * @return {"data":null,"code":200,"status":"ok","msg":"发送成功","timestamp":1623811884}
     */
    @POST("api/sms/general")
    Observable<BaseResponse> smsGeneral(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**
     * 保存 POST /api/otc/payaccount/create?lang=zh-cn HTTP/1.1
     * @param token  type=1&name=%E5%93%88&account=44555552225&branch=%E5%B7&address=%E%8A&mobile_code=123456
     * @param map
     * @return {"data":null,"msg":"验证码长度不符合要求 6","code":400,"status":"error","timestamp":1623552751}
     */
    @POST("api/otc/payaccount/create")
    Observable<BaseResponse> payAccountCreate(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**
     * POST /api/tool/qiniutoken?lang=zh-cn HTTP/1.1
     * @param token
     * @param map
     * @return {"data":{"token":"Xuo7i5pULlZNZGLLkJHGeOdSdgaY-hmZ0Qqn9w8G:Pm0499bjjs0U0t5Gyy4-BCKn7r0=:eyJzY29wZSI6IndlYi1jZG4tMSIsImRlYWRsaW5lIjoxNjIzODE4ODk0fQ=="},"code":200,"status":"ok","msg":"请求成功","timestamp":1623815294}
     */
    @POST("api/tool/qiniutoken")
    Observable<BaseResponse<QiniuToken>> qiniuToken(@Header("token") String token, @QueryMap HashMap<String, Object> map);

    /**
     * 上传文件
     *
     * @return
     */
    @Multipart
    @POST("https://up-z2.qbox.me/")
    Observable<BaseResponse<UploadFileEntity>> uploadFiles(@Header("token") String token, @Part() MultipartBody.Part file);


    //设置
//  版本更新  GET /api/config?type=1 HTTP/1.1
//    {"data":{"cs_email":"service@qq.com","cs_wechat_qrcode":"https:\/\/mall.zhitianxai.com\/\/uploads\/20191105\/7d7e5892f9e94ad17f8cd06ccf0e7245.png","announcement":[{"title":"新产品上线啦","links":"https:\/\/translate.google.cn"}],"app_banner":[{"title":"12312","image":"https:\/\/cdn1.tuochennet.cn\/774e06584ea94754a862c9a8213a9a22.jpg","links":""},{"title":"2","image":"https:\/\/cdn1.tuochennet.cn\/b3c680a4dd69aa0289934932b5f7d43b.png","links":""}],"share_url":null,"latform_currency":"爱豆","latform_currency_id":null,"is_on_the_shelf":false,"is_auto_face":true,"auto_face_cost":0,"auto_face_coin_id":2,"is_open_ad":false,"ad_probability":0,"upload_type":"qiniu","is_tips_info":false,"otc_is_open":true,"live_broadcast_link":"","version":"1.2.15","upgrade_tips":"优化页面，修改BUG","force_update":1,"download_url":"https:\/\/cdn1.tuochennet.cn\/csc-apk\/csc1.2.15.apk","platform":"android"},"code":200,"status":"ok","msg":"请求成功","timestamp":1623552807}
//
//  切换线路  GET /api/config HTTP/1.1
//    {"data":{"cs_email":"service@qq.com","cs_wechat_qrcode":"https:\/\/mall.zhitianxai.com\/\/uploads\/20191105\/7d7e5892f9e94ad17f8cd06ccf0e7245.png","announcement":[{"title":"新产品上线啦","links":"https:\/\/translate.google.cn"}],"app_banner":[{"title":"12312","image":"https:\/\/cdn1.tuochennet.cn\/774e06584ea94754a862c9a8213a9a22.jpg","links":""},{"title":"2","image":"https:\/\/cdn1.tuochennet.cn\/b3c680a4dd69aa0289934932b5f7d43b.png","links":""}],"share_url":null,"latform_currency":"爱豆","latform_currency_id":null,"is_on_the_shelf":false,"is_auto_face":true,"auto_face_cost":0,"auto_face_coin_id":2,"is_open_ad":false,"ad_probability":0,"upload_type":"qiniu","is_tips_info":false,"otc_is_open":true,"live_broadcast_link":"","version":"1.94","upgrade_tips":"充值","force_update":1,"download_url":"https:\/\/cdn1.tuochennet.cn\/ztx-apk\/1.94.apk","platform":"android"},"code":200,"status":"ok","msg":"请求成功","timestamp":1623552862}

//  退出登录  POST /api/user/logout?lang=zh-cn HTTP/1.1
//    {"data":[],"code":200,"status":"ok","msg":"退出成功","timestamp":1623553214}

//  授权登陆  POST /api/index/getauthocode HTTP/1.1
//    {"data":{"code":"7c7ff86d71db622b34322c1217425e65"},"code":200,"status":"ok","msg":"成功","timestamp":1623553272}

    //设置
    /**
     * 版本更新  GET /api/config?type=1 HTTP/1.1
     * @return {"data":{"cs_email":"service@qq.com","cs_wechat_qrcode":"https:\/\/mall.zhitianxai.com\/\/uploads\/20191105\/7d7e5892f9e94ad17f8cd06ccf0e7245.png","announcement":[{"title":"新产品上线啦","links":"https:\/\/translate.google.cn"}],"app_banner":[{"title":"12312","image":"https:\/\/cdn1.tuochennet.cn\/774e06584ea94754a862c9a8213a9a22.jpg","links":""},{"title":"2","image":"https:\/\/cdn1.tuochennet.cn\/b3c680a4dd69aa0289934932b5f7d43b.png","links":""}],"share_url":null,"latform_currency":"爱豆","latform_currency_id":null,"is_on_the_shelf":false,"is_auto_face":true,"auto_face_cost":0,"auto_face_coin_id":2,"is_open_ad":false,"ad_probability":0,"upload_type":"qiniu","is_tips_info":false,"otc_is_open":true,"live_broadcast_link":"","version":"1.2.15","upgrade_tips":"优化页面，修改BUG","force_update":1,"download_url":"https:\/\/cdn1.tuochennet.cn\/csc-apk\/csc1.2.15.apk","platform":"android"},"code":200,"status":"ok","msg":"请求成功","timestamp":1623552807}
     */
    @GET("api/config?type=1")
    Observable<BaseResponse<UpdateCongigEntity>> apiConfig();

//  切换线路
    /**
     * 版本更新  GET /api/config HTTP/1.1
     * @return {"data":{"cs_email":"service@qq.com","cs_wechat_qrcode":"https:\/\/mall.zhitianxai.com\/\/uploads\/20191105\/7d7e5892f9e94ad17f8cd06ccf0e7245.png","announcement":[{"title":"新产品上线啦","links":"https:\/\/translate.google.cn"}],"app_banner":[{"title":"12312","image":"https:\/\/cdn1.tuochennet.cn\/774e06584ea94754a862c9a8213a9a22.jpg","links":""},{"title":"2","image":"https:\/\/cdn1.tuochennet.cn\/b3c680a4dd69aa0289934932b5f7d43b.png","links":""}],"share_url":null,"latform_currency":"爱豆","latform_currency_id":null,"is_on_the_shelf":false,"is_auto_face":true,"auto_face_cost":0,"auto_face_coin_id":2,"is_open_ad":false,"ad_probability":0,"upload_type":"qiniu","is_tips_info":false,"otc_is_open":true,"live_broadcast_link":"","version":"1.94","upgrade_tips":"充值","force_update":1,"download_url":"https:\/\/cdn1.tuochennet.cn\/ztx-apk\/1.94.apk","platform":"android"},"code":200,"status":"ok","msg":"请求成功","timestamp":1623552862}
     * */
    @GET("api/config")
    Observable<BaseResponse<UpdateCongigEntity>> apiConfig2();


    //问题
//  常见问题  GET /api/article/details?id=201&lang=zh-cn HTTP/1.1
//    {"data":null,"code":200,"status":"ok","msg":"成功","timestamp":1623553024}
//
//  信用规则  GET /api/article/details?id=202&lang=zh-cn HTTP/1.1
//    {"data":null,"code":200,"status":"ok","msg":"成功","timestamp":1623553083}
//
//  处罚规则  GET /api/article/details?id=203&lang=zh-cn HTTP/1.1
//    {"data":null,"code":200,"status":"ok","msg":"成功","timestamp":1623553111}

    //问题
    /**
     * 常见问题201 信用规则202  处罚规则203
     */
    @GET("api/article/details?lang=zh-cn")//@GET("api/article/details?id={id}&lang=zh-cn")
    Observable<BaseResponse<List<ArticleEntity>>> getArticle(@Query("id") String id);

//    /**
//     * Ai登录
//     */
//    @GET("api/ai/login")//@GET("api/article/details?id={id}&lang=zh-cn")
//    Observable<BaseResponse<List<ArticleEntity>>> getArticle(@Query("id") String id);

    /**
     * Ai修改密码
     */
    @POST("api/ai/findPassword")
    Observable<FindPswEntity> findPassword(@QueryMap HashMap<String, Object> map);

    /**
     *  AI登录
     */
    @POST("api/ai/login")
    Observable<FindPswEntity> aiLogin(@QueryMap HashMap<String, Object> map);

    /**
     *  权益宝礼包信息
     */
    @POST("api/ai/package/list")
    Observable<PacketListEntity> packetList(@Header("authorization") String token);

    /**
     *  权益宝礼包购买
     */
    @POST("api/ai/package_order")
    Observable<Response<Void>> packetOrder(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);

    /**
     *  我得权益宝礼包
     */
    @GET("api/ai/package_order")
    Observable<MyPacketEntity> getMyPacket(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);

    /**
     *  权益宝礼包撤销
     */
    @POST("api/ai/package_order/withdraw")
    Observable<Response<Void>> packetWithdraw(@Header("authorization") String token,@QueryMap HashMap<String, Object> map);




}
